package com.itheima.stock.mapper;

import com.itheima.stock.pojo.SysRole;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author zhuzunyu
* @description 针对表【sys_role(角色表)】的数据库操作Mapper
* @createDate 2022-05-23 21:15:47
* @Entity com.itheima.stock.pojo.SysRole
*/
public interface SysRoleMapper {

    int deleteByPrimaryKey(Long id);

    int insert(SysRole record);

    int insertSelective(SysRole record);

    SysRole selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysRole record);

    int updateByPrimaryKey(SysRole record);

    /**
     * 根据用户id查询角色信息
     * @param userId
     * @return
     */
    List<SysRole> getRoleByUserId(@Param("userId") String userId);

    /**
     * 查询所有角色信息
     * @return
     */
    List<SysRole> findAll();
}
